﻿using System;
using System.Drawing;
using System.Collections.Generic;
using System.Drawing;


namespace HoldemHook
{
    [Serializable()]
    public class GUINode
    {
        public string Title;
        public string Class;
        public int Handle;
        public RectangleF Bounds;
        public GUINode Parent;
        public int ParentHandle;
    }

    public class GUINodeMap
    {
        private Dictionary<int, GUINode> map = new Dictionary<int, GUINode>();

        public void Add(GUINode node)
        {
            if(!map.ContainsKey(node.Handle))
                map.Add(node.Handle, node);
        }

        public GUINode this[int handle]
        {
            get { return map[handle]; }
        }

        public bool Contains(int handle)
        {
            return map.ContainsKey(handle);
        }
    }
}